Skip to content

gh-135898: Add section to free-threading howto about memory usage.#143279

Draft
nascheme wants to merge 6 commits into
python:mainfrom
nascheme:gh-135898-ft-memory-usage-howto
Draft

gh-135898: Add section to free-threading howto about memory usage.#143279
nascheme wants to merge 6 commits into
python:mainfrom
nascheme:gh-135898-ft-memory-usage-howto

Conversation

@nascheme
Copy link
Copy Markdown
Member

@nascheme nascheme commented Dec 30, 2025

This higher memory usage (if it actually does happen) is mostly due to design decisions and not due to bugs or implementation flaws. So, I think we should document them somewhere in the user facing docs.


📚 Documentation preview 📚: https://cpython-previews--143279.org.readthedocs.build/

@nascheme
Copy link
Copy Markdown
Member Author

nascheme commented Jan 17, 2026

As suggested by @kumaraditya303, we should add some additional details about objects that get per-thread reference counting. Currently that's heap allocated types and code objects. See the Include/internal/pycore_uniqueid.h file for some details.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time. topic-free-threading

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant